﻿@model CodeSaude.Application.ViewModels.ProntuarioViewModel

@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<<div style="margin: 0 0 10px 0; text-align: right;">
    <button class="btn btn-success btn-sm" style="font-weight: bold;" id="btnInserir"> + Novo Paciente</button>
</div>

<div style="margin: 10px 0 0 0;">
    <div class="panel panel-default">
        <div class="panel-heading" style="font-weight: bold;">Pessoas Cadastradas</div>
        <div class="panel-body">
            <table id="tblListagem" class="table table-bordered table-condensed">
                <thead>
                    <tr>
                        <th>Escala de Dor</th>
                        <th>Nome da Pessoa</th>
                        <th>Especialidade</th>
                        <th>Data/Hora</th>
                        <th>Tempo Espera</th>
                        <th>Destino</th>
                        <th>Prioridade</th>
                        <th>Ações</th>
                    </tr>
                </thead>
                <tbody>
                    @foreach (var item in Model.Prontuarios)
                    {
                        <tr>
                            <td style="text-align: center;"><img src="@item.EscalaDor" /></td>
                            <td>@Html.DisplayFor(modelItem => item.NomePessoa)</td>
                            <td>@Html.DisplayFor(modelItem => item.NomeEspecialidade)</td>
                            <td>@Html.DisplayFor(modelItem => item.DataAtendimento)</td>
                            <td style="text-align: center;">@Html.DisplayFor(modelItem => item.TempoEspera)</td>
                            <td>@Html.DisplayFor(modelItem => item.Destino)</td>
                            <td>@Html.DisplayFor(modelItem => item.Prioridade)</td>
                            <td style="text-align: center;">
                                <button id="btnAlterar" class="btn btn-primary btn-xs" data-title="Edit" data-id="@string.Concat( item.ProntuarioId,"|",item.IdEspecialidade)"><span class="glyphicon glyphicon-pencil"></span>&nbsp;Editar</button>
                                <button id="btnExcluir" class="btn btn-danger btn-xs" data-title="Delete" data-id="@string.Concat( item.ProntuarioId,"|",item.IdEspecialidade)"><span class="glyphicon glyphicon-trash"></span>&nbsp;Deletar</button>
                            </td>
                        </tr>
                    }
                </tbody>
            </table>
        </div>
    </div>

    <div class="modal fade" id="modal"></div>
</div>

@Scripts.Render("~/Scripts/Entities/Prontuario/prontuario.js")
